package io.renren.modules.medical.entity;

import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * @author Luo Sheng
 * @school YiBin university
 * @create 2023-04-04 16:48
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class QueryPageBaseEntity extends BaseEntity {
    /**
     * 病人id
     */
    @Null(message = "patientId只能为空", groups = {UpdateGroup.class})
    @NotNull(message = "patientId不能为空", groups = {AddGroup.class})
    private Long patientId;
    /**
     * 医生id
     */
    @Null(message = "doctorId必须为空", groups = {UpdateGroup.class, AddGroup.class})
    private Long doctorId;
    /**
     * 病情类型
     */
    @Null(message = "sub_id只能为空", groups = {UpdateGroup.class})
    @NotNull(message = "sub_id不能未空", groups = {AddGroup.class})
    private Long subId;
}
